{include file="{$smarty.const.APP_PATH}/Home/View/head.html"}
<script src="{$smarty.const.PUBLIC_PATH}/datepicker/WdatePicker.js"></script>
<script src="{$smarty.const.PUBLIC_PATH}/js/checkDate.js"></script>
<script src="{$smarty.const.PUBLIC_PATH}/js/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="{$smarty.const.PUBLIC_PATH}/css/bootstrap-datetimepicker.min.css"></link>
<style>
div.option{
 margin-bottom:5px;
 border:1px solid #E0E0E0;
}
div.carList{
 margin-bottom:5px;
 border:1px solid #E0E0E0;
 background-color:white;
}
.carParam > div{
 font-size:20px;
 margin:10px;
}
.carParam > div >span {
 margin:10px;
}
.carPrecil{
  background-color:#FFF157;
  height:150px;
  margin:5px,0;
}
.carPrecil > div{
 margin:5px 0;
}
.carList .row {
 margin:10px 0px;
 border:1px solid black;
}
.btn-reserva{
 min-height:150px
}
</style>
</head>
<!--加载头文件 -->
<body>
<!--加载导航条-->
{include file="{$smarty.const.APP_PATH}/Home/View/nav.html"}
<!--main-->
<div class="main">
<div class="container  ">
 <div class="row option">
  <div class="col-md-12">
  <form  action="{$smarty.const.__ACTION__}" id="myform" method="get">
     {literal}
  <div class="form-group">
   <div class="col-md-3 col-md-offset-1">
    <label for="startData">开始时间</label>
	<input type="text" name="startData" id="startData"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:0:0'})">
   </div>
  </div>
  <div class="form-group">
   <div class="col-md-3">

    <label for="endData">结束时间</label>
	<input type="text" name="endData" id="endData"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:0:0'})">
	
	{/literal}
   </div>
  </div>
  
  <div class="col-md-3 ">
  <div class="form-group">
    <a href="#" type="submit" class="btn btn-warning " onclick=check()>查找</a>
   </div>
  </div>
  
 </div>
</div>
</div>

 <div class="container carList">
  <!--一条汽车记录-->
  {foreach $carList as $carINfo}
  <div class="row">
   <div class="col-md-12">
     <div class="col-md-12">
	  <div class="col-md-3 thumbnail ">
	   <img src="{$smarty.const.PUBLIC_PATH}/Upload/{$carINfo['pic']}" class="img-responsive img-rounded ">
	  </div>
	  <div class="col-md-4  col-md-offset-1 carParam text-center ">
	   <table class="table table-responsive table-hover ">
	   <tr>
	    <td>名称</td> <td colspan="2">{$carINfo['name']}</td>
	   </tr>
	   <tr>
	    <td><span class="glyphicon glyphicon-user">人数:{$carINfo['number_of_people']}</span></td>
	    <td><span class="glyphicon glyphicon-briefcase">行李:{$carINfo['number_of_baggage']}</span></td>
	    <td><span class="glyphicon glyphicon-font">{if $carINfo['car_operation']=1}自动挡{else}手动挡{/if}</span></td>
	   </tr>
	   <tr>
	    <td colspan='3'>{$carINfo['describe']}</td>
	   </tr>
	   </table>
	  </div>
	  <div class="col-md-2 col-md-offset-1 carPrecil text-center">
	   <table class="table table-responsive table-hover">
	   <tr><td>日租</td><td>{$carINfo['price']}</td></tr>
	   <tr><td>时间</td><td>{if !empty($day)} {$day}天{/if} {if !empty($hora)} {$hora}小时{/if}</td></tr>
	   <tr><td>total</td><td> {$carINfo['price']*$totalDay|string_format:"%0.2f"}</td></tr>
	   </table>
	 </div>
	 <div class="col-md-1 ">
	 <div><a class="btn btn-success btn-block  btn-reserva text-center" href="{$smarty.const.__CONTROLLER__}/reserveCar/carId/{$carINfo['car_id']}/startData/{$startData}/endData/{$endData}" >预定</a></div>
	 </div>
    </div>
   </div>
  </div>
 <!--一条记录结束。-->
 {/foreach}

 </div>
 

<!--加载页脚-->
{include file="{$smarty.const.APP_PATH}/Home/View/footer.html"}
</body>
</html>